import http from "@/api";
import { LoginUserInfo } from "@/api/interface/SysUser/LoginUserInfo";
import { ApiGenFile, ApiGenGetEntityInfo, ApiGenGetEntityNames, ApiGenGetEntitySave } from "@/api/apis/sys_generation";
import { ReqEntityInfo } from "@/api/interface/Generation/ReqEntityInfo";
import { EntityInfo } from "@/api/interface/Generation/EntityInfo";

export const HttpSendGenEntityNames = () => {
  return http.post<LoginUserInfo>(ApiGenGetEntityNames, {}, { noLoading: true }); // 正常 post json 请求  ==>  application/json
};

export const HttpSendGenEntityInfo = (params: ReqEntityInfo) => {
  return http.post<LoginUserInfo>(ApiGenGetEntityInfo, params, { noLoading: true }); // 正常 post json 请求  ==>  application/json
};

export const HttpSendGenEntitySave = (params: EntityInfo) => {
  return http.post<LoginUserInfo>(ApiGenGetEntitySave, params, { noLoading: true }); // 正常 post json 请求  ==>  application/json
};

export const HttpSendGenFile = () => {
  return http.post(ApiGenFile, {}, { noLoading: true }); // 正常 post json 请求  ==>  application/json
};
